package org.coderk.mybatis.listener;

import org.coderk.mybatis.event.HelloEvent;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * @author: TanJingyu
 * @create: 2021-04-05 15:14
 **/
@Component
public class HelloEventListener implements ApplicationListener<ApplicationEvent> {

    @Override
    public void onApplicationEvent(ApplicationEvent event) {
        System.out.println(event.getSource());
    }

//    @EventListener(ContextRefreshedEvent.class)
//    public void test() {
//        System.out.println("舒心了啊-------------------------");
//    }
}
